define [ 'fizz' ], (fizz) ->
  class extends fizz.Model
  
    urlRoot : 'rest/workspaces',
    
    defaults :
      # Name
      name : '',
      # Label
      label : ''
      
    validate : (attrs) ->
      errors = [];
      unless attrs.name?.length
        errors.push 'workspace.validation.emptyName'
      if errors.length
        return errors
      null
    
    toString : () ->
      @get 'name'
